﻿<UserControl x:Class="KarateSemaphore.SemaphoreView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:vm="clr-namespace:KarateSemaphore" xmlns:System="clr-namespace:System;assembly=mscorlib"
             xmlns:core="clr-namespace:KarateSemaphore.Core;assembly=KarateSemaphore.Core" mc:Ignorable="d" 
        d:DataContext="{d:DesignInstance core:SemaphoreViewModel, IsDesignTimeCreatable=True}"
        d:DesignHeight="300" d:DesignWidth="582">
    <UserControl.Triggers>
        <EventTrigger SourceName="previewNormal" RoutedEvent="Mouse.PreviewMouseDown">
            <BeginStoryboard>
                <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsInversed"  >
                        <DiscreteObjectKeyFrame KeyTime="0">
                            <DiscreteObjectKeyFrame.Value>
                                <System:Boolean>True</System:Boolean>
                            </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
        <EventTrigger SourceName="previewInverse" RoutedEvent="Mouse.PreviewMouseDown">
            <BeginStoryboard>
                <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsInversed"  >
                        <DiscreteObjectKeyFrame KeyTime="0">
                            <DiscreteObjectKeyFrame.Value>
                                <System:Boolean>False</System:Boolean>
                            </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid>
        <vm:SemaphoreViewInverse x:Name="previewInverse" Grid.Column="2" Margin="5" />
        <vm:SemaphoreViewNormal x:Name="previewNormal" Grid.Column="2" Margin="5" />
    </Grid>
</UserControl>
